﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public class AppDbContext:DbContext
    {
        public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
        {
        }
        public DbSet<Role>  Role { get; set; }//角色表
        public DbSet<Personnel> Personnel { get; set; }//人员表
        public DbSet<Position> Position { get; set; }//职位表
        public DbSet<Jurisdiction> Jurisdiction { get; set; }//权限表
        public DbSet<Department> Department { get; set; }//部门表

        public DbSet<Rights>  Rights { get; set; }//角色+权限
        public DbSet<JState>  JStates { get; set; }//权限+角色状态表
        public DbSet<RState> RStates { get; set; }//权限表状态
        public DbSet<Tstate> Tstate { get; set; }//状态表

        public DbSet<Astate> Astates { get; set; }//申请状态表
        public DbSet<Activity> Activities { get; set; }//活动申请表
        public DbSet<Travel> Travels { get; set; }//出差申请表
        public DbSet<Leave> Leaves { get; set; }//请假申请表
        public DbSet<work> Works { get; set; }//加班申请

        public DbSet<Dispatchacar> Dispatchacar { get; set; }//派车申请
        public DbSet<ExpenseR> ExpenseR { get; set; }//报销申请

        public DbSet<Leave_type> leave_Types { get; set; }//请假类型表

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Seed();
        }
    }
}
